import 'package:flutter/material.dart';
class Test20 extends StatefulWidget{
    _TestState createState() => _TestState();
}

class _TestState extends State<Test20> {

  @override
  Widget build(BuildContext context) {
    return Container(
        decoration: BoxDecoration(
            color: Colors.white
        ),
        child: Stack(
            children: <Widget>[
                ClipPath(
                    child: Container(
                        height: 180,
                        width: double.infinity,
                        decoration: BoxDecoration(
                            gradient: LinearGradient(
                                colors: [Colors.cyan,Colors.blue,Colors.blueAccent[200]]
                            )
                        ),
                    ),
                    clipper: BottomWaveClipper(),
                ),
                Scaffold(
                    backgroundColor: Colors.transparent,
                    appBar: AppBar(
                        title: Text("个人中心"),
                        backgroundColor: Colors.transparent,
                        elevation: 0,
                        actions: <Widget>[
                            IconButton(
                                icon: Icon(Icons.settings),
                                onPressed: (){},
                            )
                        ],
                    ),
                    body: Column(
                        children: <Widget>[
                            Container(
                                margin: EdgeInsets.only(top: 30),
                                alignment: Alignment.center,
                                child: Image.asset(
                                    "image/a1.png",
                                    width: 60,
                                    height: 70,
                                    fit: BoxFit.fill,
                                ),
                            ),
                            Container(
                                decoration: BoxDecoration(
                                    color: Colors.white,
                                    borderRadius: BorderRadius.circular(10.0),
                                    // border: Border.all(color: Color(0xff0000ff)),
                                    boxShadow: [
                                        BoxShadow(
                                            color: Colors.grey[200],
                                            // offset: Offset(2.0, 2.0),
                                            blurRadius: 5.0 /*,spreadRadius:2.0*/
                                        )
                                    ],
                                ),
                                margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
                                height: 80,
                                width: double.infinity,
                                child: Row(
                                    children: List.generate(4, (i){
                                        return Expanded(
                                            child: Center(
                                                child: Column(
                                                    children: <Widget>[
                                                        Image.asset(
                                                            'image/testIcon.png',
                                                            width: 70,
                                                            height: 60,
                                                        ),
                                                        Text("设置")
                                                    ],
                                                ),
                                            )
                                        );
                                    })
                                ),
                            ),
                            Expanded(
                                child: SingleChildScrollView(
                                    child: Column(
                                        children: <Widget>[
                                            Container(
                                                width: double.infinity,
                                                margin: EdgeInsets.fromLTRB(15, 10, 15, 0),
                                                decoration: BoxDecoration(
                                                    color: Colors.white,
                                                    borderRadius: BorderRadius.circular(10.0),
                                                    // border: Border.all(color: Color(0xff0000ff)),
                                                    boxShadow: [
                                                        BoxShadow(
                                                            color: Colors.grey[200],
                                                            // offset: Offset(2.0, 2.0),
                                                            blurRadius: 5.0 /*,spreadRadius:2.0*/
                                                        )
                                                    ],
                                                ),
                                                child: Column(
                                                    children: <Widget>[
                                                        Padding(
                                                            padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
                                                            child: Row(
                                                                children: <Widget>[
                                                                    Container(
                                                                        width: 3,
                                                                        height: 20,
                                                                        margin: EdgeInsets.only(right: 10),
                                                                        decoration: BoxDecoration(
                                                                            color: Colors.blueAccent
                                                                        ),
                                                                    ),
                                                                    Text("安全设置",style: TextStyle(fontSize: 18),)
                                                                ],
                                                            ),
                                                        ),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("修改密码"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        Divider(height: 5.0,color: Colors.grey[300]),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("检查更新APP版本"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        Divider(height: 5.0,color: Colors.grey[300]),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("清除缓存"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        
                                                    ],
                                                ),
                                            ),
                                            Container(
                                                width: double.infinity,
                                                margin: EdgeInsets.fromLTRB(15, 10, 15, 0),
                                                decoration: BoxDecoration(
                                                    color: Colors.white,
                                                    borderRadius: BorderRadius.circular(10.0),
                                                    // border: Border.all(color: Color(0xff0000ff)),
                                                    boxShadow: [
                                                        BoxShadow(
                                                            color: Colors.grey[200],
                                                            // offset: Offset(2.0, 2.0),
                                                            blurRadius: 5.0 /*,spreadRadius:2.0*/
                                                        )
                                                    ],
                                                ),
                                                child: Column(
                                                    children: <Widget>[
                                                        Padding(
                                                            padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
                                                            child: Row(
                                                                children: <Widget>[
                                                                    Container(
                                                                        width: 3,
                                                                        height: 20,
                                                                        margin: EdgeInsets.only(right: 10),
                                                                        decoration: BoxDecoration(
                                                                            color: Colors.blueAccent
                                                                        ),
                                                                    ),
                                                                    Text("辅助设置",style: TextStyle(fontSize: 18),)
                                                                ],
                                                            ),
                                                        ),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("修改密码"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        Divider(height: 5.0,color: Colors.grey[300]),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("检查更新APP版本"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        Divider(height: 5.0,color: Colors.grey[300]),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("清除缓存"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        
                                                    ],
                                                ),
                                            ),
                                            Container(
                                                width: double.infinity,
                                                margin: EdgeInsets.fromLTRB(15, 10, 15, 0),
                                                decoration: BoxDecoration(
                                                    color: Colors.white,
                                                    borderRadius: BorderRadius.circular(10.0),
                                                    // border: Border.all(color: Color(0xff0000ff)),
                                                    boxShadow: [
                                                        BoxShadow(
                                                            color: Colors.grey[200],
                                                            // offset: Offset(2.0, 2.0),
                                                            blurRadius: 5.0 /*,spreadRadius:2.0*/
                                                        )
                                                    ],
                                                ),
                                                child: Column(
                                                    children: <Widget>[
                                                        Padding(
                                                            padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
                                                            child: Row(
                                                                children: <Widget>[
                                                                    Container(
                                                                        width: 3,
                                                                        height: 20,
                                                                        margin: EdgeInsets.only(right: 10),
                                                                        decoration: BoxDecoration(
                                                                            color: Colors.blueAccent
                                                                        ),
                                                                    ),
                                                                    Text("其他设置",style: TextStyle(fontSize: 18),)
                                                                ],
                                                            ),
                                                        ),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("修改密码"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        Divider(height: 5.0,color: Colors.grey[300]),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("检查更新APP版本"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        Divider(height: 5.0,color: Colors.grey[300]),
                                                        ListTile(
                                                            leading: Image.asset(
                                                                'image/setting.png',
                                                                width: 35,
                                                                height: 35,
                                                            ),
                                                            title: Text("清除缓存"),
                                                            trailing: Icon(IconData(0xe6f8, fontFamily: "Iconfont"), size: 24.0)
                                                        ),
                                                        
                                                    ],
                                                ),
                                            ),
                                        ],
                                    )
                                ),
                            ),
                            
                        ],
                    )
                ),
            ],
        ),
    );
  }
}


class BottomWaveClipper extends CustomClipper<Path>{

    @override
    Path getClip(Size size) {
        var path = Path();
        path.lineTo(0.0, size.height/8*7);
        path.quadraticBezierTo(size.width/4, size.height/4*3,size.width/2, size.height/8*7);
        path.quadraticBezierTo(size.width/4*3,size.height,size.width, size.height/8*7);
        path.lineTo(size.width, 0.0);
        path.close();
        return path;
    }

    @override
    bool shouldReclip(CustomClipper<Path> oldClipper) {
        return false;
    }
}
